package site.util;

import org.mybatis.generator.internal.NullProgressCallback;

public class CustomProgressCallback extends NullProgressCallback {
    private boolean verbose;
    private static long start = 0;

    /**
     * 
     */
    public CustomProgressCallback(boolean verbose) {
        super();
        this.verbose = verbose;
    }

    @Override
    public void startTask(String subTaskName) {
        if (start == 0) {
            start = System.currentTimeMillis();
        }
        if (verbose) {
            System.out.println("start ...   ..." + (System.currentTimeMillis() - start) + ":ms");
        }
    }
}
